package com.zhouqinuan.spring.cloud.develop.framework.demo.i18n.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.zhouqinuan.spring.cloud.develop.framework.web.config.i18n.LocaleMessageService;

import io.swagger.annotations.Api;

@Api(tags = "国际化测试例子")
@RestController
public class I18nController {

    @Autowired
    private LocaleMessageService localeMessageService;

    @GetMapping("/hello")
    public String hello(@RequestParam String name) {
        return localeMessageService.getMessage("hello.value") + ", " + name;
    }
}
